package com.lwq.designpattern.creationalPatterns.builderPattern;

/**
 * @author liwq
 * @description
 * @date 2021/11/28 19:27
 */
public class Director {
    private Ibuilder ibuilder;

    public Director(Ibuilder ibuilder) {
        this.ibuilder = ibuilder;
    }

    public CarProduction buildCar() {
        ibuilder.buildHead();
        ibuilder.buildBody();
        return ibuilder.build();
    }
}
